#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int MAXN = 1e5 + 10;
const int MOD = 1e9 + 7;

int t, n;
ll a[MAXN];
ll s[MAXN];

ll dp[MAXN][510];

int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);
    cin>>t;
    while(t--){
        cin>>n;
        for (int i = 1; i <= n; i++)
            for (int j = 1; j <= 500 ; j++)
                dp[i][j] = 0;
        for(int i=1;i<=n;i++) {
            cin>>a[i];
            s[i] = s[i-1]+a[i];
        }
        

        dp[n][1] = a[n];
        for (int i = n-1; i >= 1; i--) {
            dp[i][1] = max(a[i], dp[i + 1][1]);
            for(int j = 2; j <= 500 && i + j <= n; j++) {
                dp[i][j] = dp[i+1][j];
                if (i+j <= n && dp[i+j][j-1]>s[i+j-1]-s[i-1])
                    dp[i][j] = max(dp[i][j], s[i+j-1]-s[i-1]);
            }
        }
        int res = 0;
        for (int i = 1; i <= 500; i++)
            if (dp[1][i] != 0)
                res = i;
        cout << res << endl;
    }    
    return 0;
}